package com.hdax.easybuy.controller;

import com.hdax.easybuy.api.orderAPI.OrderServieClient;
import com.hdax.easybuy.entity.Order;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;


@RestController
public class OrderManagerController {

    @Resource
    private OrderServieClient orderServieClient;

    @RequestMapping("/managerOrder/getAllOrder")
    public List<Order> queryAllOrder(){
        return orderServieClient.queryAllOrder();
    }

    @RequestMapping("/managerOrder/getOrderByUserId/{userid}")
    public List<Order> getOrderByUserId(@PathVariable("userid")int userid){
        return orderServieClient.getOrderByUserId(userid);
    }



}
